package com.tangcl.module_mine.viewmodel

import androidx.lifecycle.viewModelScope
import com.tangcl.module_commom.base.BaseViewModel
import com.tangcl.module_commom.support.StateLiveData
import com.tangcl.module_mine.network.MineLoginRepo
import kotlinx.coroutines.launch

/**
 * Created by TCL on 2021/10/15
 *
 * description:
 */
class UserViewModel(private val repo : MineLoginRepo): BaseViewModel() {
    val loginLiveData = StateLiveData<MineLoginRepo>()

    fun login(userName: String, password: String) {

        viewModelScope.launch {
            repo.login(userName, password, loginLiveData)
        }

    }

//    fun register(
//        userName: String,
//        password: String,
//        rePassword: String,
//    ) {
//        viewModelScope.launch {
//            repo.register(userName, password, rePassword, registerLiveData)
//        }
//
//    }

}